package exam.controller;

import exam.service.IUtilFilesService;
import exam.utils.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.awt.*;
import java.util.HashMap;
import java.util.Map;

@RequestMapping("/UtilFiles")
@RestController()
public class UtilFilesController {
    @Autowired
    IUtilFilesService utilFilesService;

    @ResponseBody
    @GetMapping("/delete")
    public Msg delete(
            @RequestParam(value = "id") int id
    ){
        System.out.println();
       boolean re = utilFilesService.deleteInfo(id,-1,-1) > 0;
       return Msg.success().setMessage(re ? "删除成功" : "删除失败");
    }
}
